package org.bbmall.bean.member;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 会员偏好分析展示实体类
 * 对应数据库表：ads_member_preference_display
 */
@Data
@TableName("ads_member_preference_display")
public class AdsMemberPreferenceDisplay {

    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 统计日期
     */
    @TableField("stat_date")
    private LocalDate statDate;

    /**
     * 偏好类型
     */
    @TableField("preference_type")
    private String preferenceType;

    /**
     * 偏好值
     */
    @TableField("preference_value")
    private String preferenceValue;

    /**
     * 偏好会员数
     */
    @TableField("member_count")
    private Integer memberCount;

    /**
     * 消费金额
     */
    @TableField("consumption_amount")
    private BigDecimal consumptionAmount;

    /**
     * 订单数
     */
    @TableField("order_count")
    private Integer orderCount;

    /**
     * 偏好度
     */
    @TableField("preference_rate")
    private BigDecimal preferenceRate;

    /**
     * 人均偏好支出
     */
    @TableField("avg_consumption_per_member")
    private BigDecimal avgConsumptionPerMember;

    /**
     * 支出占比
     */
    @TableField("total_consumption_percentage")
    private BigDecimal totalConsumptionPercentage;

    /**
     * 偏好排名
     */
    @TableField("preference_rank")
    private Integer preferenceRank;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}